package com.dolphin.aiagentplatform.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dolphin.aiagentplatform.model.dto.user.UserLoginDTO;
import com.dolphin.aiagentplatform.model.dto.user.UserPageQueryDTO;
import com.dolphin.aiagentplatform.model.dto.user.UserRegisterDTO;
import com.dolphin.aiagentplatform.model.dto.user.UserUpdatePasswordDTO;
import com.dolphin.aiagentplatform.model.dto.user.UserUpdateProfileDTO;
import com.dolphin.aiagentplatform.model.dto.user.UserUpdateRoleDTO;
import com.dolphin.aiagentplatform.model.dto.user.UserUpdateStatusDTO;
import com.dolphin.aiagentplatform.model.entity.User;
import com.dolphin.aiagentplatform.model.vo.user.UserPageVO;
import com.dolphin.aiagentplatform.model.vo.user.UserVO;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public interface UserService extends IService<User> {

    /**
     * 用户注册
     */
    Long register(UserRegisterDTO userRegisterDTO);

    /**
     * 用户登录
     */
    UserVO login(UserLoginDTO userLoginDTO, HttpServletRequest request, HttpServletResponse response);

    /**
     * 获取当前登录用户信息
     */
    UserVO getLoginUserInfo(HttpServletRequest request);

    /**
     * 重制密码
     */
    Boolean updatePassword(UserUpdatePasswordDTO userUpdatePasswordDTO, HttpServletRequest request, HttpServletResponse response);

    /**
     * 修改用户个人资料
     */
    UserVO updateUserProfile(UserUpdateProfileDTO userUpdateProfileDTO, HttpServletRequest request);

    /**
     * 分页查询用户列表
     */
    UserPageVO listUserByPage(UserPageQueryDTO userPageQueryDTO, HttpServletRequest request);

    /**
     * 修改用户角色（管理员）
     */
    Boolean updateUserRole(UserUpdateRoleDTO userUpdateRoleDTO, HttpServletRequest request);

    /**
     * 根据用户ID查询用户信息（管理员）
     */
    UserVO getUserById(Long userId, HttpServletRequest request);

    /**
     * 更新用户状态（管理员）
     */
    Boolean updateUserStatus(UserUpdateStatusDTO userUpdateStatusDTO, HttpServletRequest request);

    /**
     * 注销账号
     */
    Boolean deactivateAccount(HttpServletRequest request, HttpServletResponse response);
}
